<%@ taglib prefix="ajax" uri="javawebparts/ajaxparts/taglib" %>

<html>
  <head>
	<title>AjaxParts Taglib Plugin Test App</title>
  </head>

  <body>

    Test #1: A simple request and an update of a span:
    <hr>
    <input type="button" value="Click for AJAX"><ajax:event ajaxRef="test1/button" />
    <span id="divTest1" style="border:1px solid #000000;padding:2px;">Results will appear here</span>

    <br><br>

    Test #2: A simple request and an update of a span, this time in response to
    hovering over some text:
    <hr>
    <span style="width:200px;background-color:#ff0000;color:#ffff00;cursor:pointer;font-weight:bold;">Hover over for AJAX</span><ajax:event ajaxRef="test2/text" />
    <span id="divTest2" style="border:1px solid #000000;padding:2px;">Results will appear here</span>

    <br><br>

    Test #3: Test of the FormSender request handler:
    <hr>
    Fill in the name and details for a person you find attractive... and be
    honest with that last part!  Or you can just use the defaults if your lazy,
    this person works just fine for me!
    <br><br>
    <form name="test3Form">
      First Name: <input type="text" name="firstName" value="Amanda" size="20" /><br>
      Last Name: <input type="text" name="lastName" value="Tapping" size="20" /><br>
      Attractiveness:
      <select name="attractiveness">
        <option value="Hot as hell" selected>Hot as hell</option>
        <option value="Very fine">Very fine</option>
        <option value="Cute" selected>Cute</option>
        <option value="So-So">So-So</option>
        <option value="Ugly Betty-ish">Ugly Betty-ish</option>
      </select><br>
      Marrying Material?
      <input type="radio" name="marryingMaterial" value="maybe" checked />Unknown
      <input type="radio" name="marryingMaterial" value="is" />Yes
      <input type="radio" name="marryingMaterial" value="is not" />No
      <br>
      Check here if you know it'll never happen: <input type="checkbox" checked name="neverHappen" />
      <br>
      <br>
      Pick one of the following ways to send the contents of this form:
      <br><br>
      <a href="javascript:void(0);" id="test3Parameters">Click here to send this form as plain old request parameters</a><br>
      <a href="javascript:void(0);" id="test3JSON">Click here to send this form as JSON</a><br>
      <a href="javascript:void(0);" id="test3XML">Click here to send this form as XML</a><br>
      <br>
      In all cases you'll get an alert with the values from the form inserted into a sentence.
      <ajax:event ajaxRef="test3/parameters" attachTo="test3Parameters" />
      <ajax:event ajaxRef="test3/json" attachTo="test3JSON" />
      <ajax:event ajaxRef="test3/xml" attachTo="test3XML" />

    <ajax:enable/>

  </body>
</html>
